3.5 \(\int \tan ^5(c+d x) \, dx\)

Optimal. Leaf size=43 \[ \frac {\tan ^4(c+d x)}{4 d}-\frac {\tan ^2(c+d x)}{2 d}-\frac {\log (\cos (c+d x))}{d} \]

[Out]

-ln(cos(d*x+c))/d-1/2*tan(d*x+c)^2/d+1/4*tan(d*x+c)^4/d

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3473, 3475} \[ \frac {\tan ^4(c+d x)}{4 d}-\frac {\tan ^2(c+d x)}{2 d}-\frac {\log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^5,x]

[Out]

-(Log[Cos[c + d*x]]/d) - Tan[c + d*x]^2/(2*d) + Tan[c + d*x]^4/(4*d)

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \tan ^5(c+d x) \, dx &=\frac {\tan ^4(c+d x)}{4 d}-\int \tan ^3(c+d x) \, dx\\ &=-\frac {\tan ^2(c+d x)}{2 d}+\frac {\tan ^4(c+d x)}{4 d}+\int \tan (c+d x) \, dx\\ &=-\frac {\log (\cos (c+d x))}{d}-\frac {\tan ^2(c+d x)}{2 d}+\frac {\tan ^4(c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 37, normalized size = 0.86 \[ -\frac {-\tan ^4(c+d x)+2 \tan ^2(c+d x)+4 \log (\cos (c+d x))}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^5,x]

[Out]

-1/4*(4*Log[Cos[c + d*x]] + 2*Tan[c + d*x]^2 - Tan[c + d*x]^4)/d

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 39, normalized size = 0.91 \[ \frac {\tan \left (d x + c\right )^{4} - 2 \, \tan \left (d x + c\right )^{2} - 2 \, \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^5,x, algorithm="fricas")

[Out]

1/4*(tan(d*x + c)^4 - 2*tan(d*x + c)^2 - 2*log(1/(tan(d*x + c)^2 + 1)))/d

________________________________________________________________________________________

giac [B]  time = 6.28, size = 512, normalized size = 11.91 \[ -\frac {2 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \relax (c)^{2} - 2 \, \tan \left (d x\right )^{3} \tan \relax (c) + \tan \left (d x\right )^{2} \tan \relax (c)^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \relax (c) + 1\right )}}{\tan \relax (c)^{2} + 1}\right ) \tan \left (d x\right )^{4} \tan \relax (c)^{4} + 3 \, \tan \left (d x\right )^{4} \tan \relax (c)^{4} - 8 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \relax (c)^{2} - 2 \, \tan \left (d x\right )^{3} \tan \relax (c) + \tan \left (d x\right )^{2} \tan \relax (c)^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \relax (c) + 1\right )}}{\tan \relax (c)^{2} + 1}\right ) \tan \left (d x\right )^{3} \tan \relax (c)^{3} + 2 \, \tan \left (d x\right )^{4} \tan \relax (c)^{2} - 8 \, \tan \left (d x\right )^{3} \tan \relax (c)^{3} + 2 \, \tan \left (d x\right )^{2} \tan \relax (c)^{4} + 12 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \relax (c)^{2} - 2 \, \tan \left (d x\right )^{3} \tan \relax (c) + \tan \left (d x\right )^{2} \tan \relax (c)^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \relax (c) + 1\right )}}{\tan \relax (c)^{2} + 1}\right ) \tan \left (d x\right )^{2} \tan \relax (c)^{2} - \tan \left (d x\right )^{4} - 8 \, \tan \left (d x\right )^{3} \tan \relax (c) + 4 \, \tan \left (d x\right )^{2} \tan \relax (c)^{2} - 8 \, \tan \left (d x\right ) \tan \relax (c)^{3} - \tan \relax (c)^{4} - 8 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \relax (c)^{2} - 2 \, \tan \left (d x\right )^{3} \tan \relax (c) + \tan \left (d x\right )^{2} \tan \relax (c)^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \relax (c) + 1\right )}}{\tan \relax (c)^{2} + 1}\right ) \tan \left (d x\right ) \tan \relax (c) + 2 \, \tan \left (d x\right )^{2} - 8 \, \tan \left (d x\right ) \tan \relax (c) + 2 \, \tan \relax (c)^{2} + 2 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \relax (c)^{2} - 2 \, \tan \left (d x\right )^{3} \tan \relax (c) + \tan \left (d x\right )^{2} \tan \relax (c)^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \relax (c) + 1\right )}}{\tan \relax (c)^{2} + 1}\right ) + 3}{4 \, {\left (d \tan \left (d x\right )^{4} \tan \relax (c)^{4} - 4 \, d \tan \left (d x\right )^{3} \tan \relax (c)^{3} + 6 \, d \tan \left (d x\right )^{2} \tan \relax (c)^{2} - 4 \, d \tan \left (d x\right ) \tan \relax (c) + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^5,x, algorithm="giac")

[Out]

-1/4*(2*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c
) + 1)/(tan(c)^2 + 1))*tan(d*x)^4*tan(c)^4 + 3*tan(d*x)^4*tan(c)^4 - 8*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)
^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^3*tan(c)^3 + 2*
tan(d*x)^4*tan(c)^2 - 8*tan(d*x)^3*tan(c)^3 + 2*tan(d*x)^2*tan(c)^4 + 12*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*
x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^2*tan(c)^2 -
tan(d*x)^4 - 8*tan(d*x)^3*tan(c) + 4*tan(d*x)^2*tan(c)^2 - 8*tan(d*x)*tan(c)^3 - tan(c)^4 - 8*log(4*(tan(d*x)^
4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*t
an(d*x)*tan(c) + 2*tan(d*x)^2 - 8*tan(d*x)*tan(c) + 2*tan(c)^2 + 2*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*t
an(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1)) + 3)/(d*tan(d*x)^4*tan(c)^4
- 4*d*tan(d*x)^3*tan(c)^3 + 6*d*tan(d*x)^2*tan(c)^2 - 4*d*tan(d*x)*tan(c) + d)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 44, normalized size = 1.02 \[ \frac {\tan ^{4}\left (d x +c \right )}{4 d}-\frac {\tan ^{2}\left (d x +c \right )}{2 d}+\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^5,x)

[Out]

1/4*tan(d*x+c)^4/d-1/2*tan(d*x+c)^2/d+1/2/d*ln(1+tan(d*x+c)^2)

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 54, normalized size = 1.26 \[ \frac {\frac {4 \, \sin \left (d x + c\right )^{2} - 3}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 2 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^5,x, algorithm="maxima")

[Out]

1/4*((4*sin(d*x + c)^2 - 3)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 2*log(sin(d*x + c)^2 - 1))/d

________________________________________________________________________________________

mupad [B]  time = 2.50, size = 38, normalized size = 0.88 \[ \frac {\frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{2}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4}{4}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^5,x)

[Out]

(log(tan(c + d*x)^2 + 1)/2 - tan(c + d*x)^2/2 + tan(c + d*x)^4/4)/d

________________________________________________________________________________________

sympy [A]  time = 0.34, size = 44, normalized size = 1.02 \[ \begin {cases} \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {\tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {\tan ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \tan ^{5}{\relax (c )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**5,x)

[Out]

Piecewise((log(tan(c + d*x)**2 + 1)/(2*d) + tan(c + d*x)**4/(4*d) - tan(c + d*x)**2/(2*d), Ne(d, 0)), (x*tan(c
)**5, True))

________________________________________________________________________________________